
<?php
foreach($blocks as $block){
	if($block->type != 'Tweet') : ?>
		<div class="module <?php echo strtolower(substr($block->type,0,1)).substr($block->type,1);?> normal" id="<?php echo $block->type . $block->listNum;?>">
		    <div class="icon"></div>
		
		    <div class="overlay"><span>Read more...</span></div>
		    <div class="post">
		        <h1><?php echo $block->title;?></h1>
		        <?php 
		        if ( $block->type == 'Resource' && isset($block->image) && !empty($block->image)  ):
		        ?>
		       		<img src="/i-dat.org/public/uploads/<?php echo $block->image . '-blockThumb_thumb.' . $block->imageExtension;?>" class="rImageThumb" alt="An image that represents '<?php strip_tags($block->title); ?>'."/>
		        <?php 
		        endif;
		        ?>
		        <p class="content"><?php echo html_entity_decode ($block->short, ENT_QUOTES,'UTF-8');?></p>
		    </div>
		    <div class="meta">
				<span style="display:none;" class="ajxInfo"><?php echo $block->ajaxString; ?></span>
		        <p class="author"><?php echo $block->name;?></p>
		        <div class="clear"></div>
				<span style="display:none;" class="buffer"></span>
		    </div>
		</div>
<?php ; else : ?>
		<div class="module tweet">
	
		    <div class="post">
		        <p class="tweet_content"><a href="<?php echo $block->title;?>" title="Link to tweet"><?php echo stripslashes($block->content);?></a></p>
		        <p class="tweet_author"><a href="<?php echo $block->profileLink; ?>" title="Link to @<?php echo $block->user;?>'s twitter profile.">@<?php echo $block->user;?></a></p>
		    </div>
		    
		</div>
<?php ; endif;
} ?>